export default {
	login ({ commit, state }, data)
	{
		window.localStorage.setItem('token', data.token);
		window.localStorage.setItem('uid',data.uid);
		window.localStorage.setItem('mobile',data.mobile);
		window.sessionStorage.setItem('user_img',data.headimgurl);
		commit('SET_LOGGED', data);
	},
	logout ({ commit, state })
	{
		window.localStorage.removeItem('token');
		window.localStorage.removeItem('uid');
		window.localStorage.removeItem('mobile');
		window.sessionStorage.removeItem('user_img');
		commit('SET_LOGOUT');
	},
	citiesCache ({ commit, state }, data)
	{
		commit('CITIES_CACHE', data);
	},

	skuidList({ commit ,state },data)
	{
		commit('SET_SKUID',data);
	},

	addressId({ commit, state },data)
	{
		commit('SET_ADDRESSID',data);
	},
	goodsId({ commit, state },data)
	{
		commit('SET_GOODSID',data);
	},
	classId({ commit, state },data)
	{
		commit('SET_CLASSID',data);
	},
	addressList({ commit, state },data)
	{
		commit('SET_ADDRESS',data);
	},

	commodity({ commit, state },data)
	{
		commit('SET_COMMODITY',data)
	},

	selectAddress({ commit, state },data)
	{
		commit('SET_SELECTADD',data)
	},

	paySelectAddress({ commit, state },data)
	{
		commit('SET_PAYADDRESS',data)
	},
}
